package org.example.POJO.online;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class MyMessage implements Serializable {
    //消息内容
    private Object content;
    //消息类型
    private Type type;
    //消息来源
    private String from;
    //消息发送者的阵营
    private int fromCamp;
    //消息目标
    private String to;
    //消息接受者的阵营
    private int toCamp;

    public enum Type {
        CONNECT,//连接
        FIGHT,//战斗
        MOVE,//移动
        LIST,//列表
        EAT,//吃掉
        BACK,//悔棋
        FIGHT_SUCCESS,//战斗成功
        SUCCESS,//成功
        PEACE, //平局
        PEACE_SUCCESS,  //同意平局
        PEACE_DEFEAT,//拒绝平局
        FIGHT_DEFEAT, //不应战
        CHAT,
        JOIN,
        DEFEAT//投降
    }


}
